1. Field of the Invention
This invention relates to an automatic focus detecting device arranged to detect the state of focusing on the basis of an image signal obtained by forming an image on an image sensor.
2. Description of the Related Art
Automatic focus detecting devices of varied kinds have hitherto been proposed. Among these devices, most of the devices adapted for video apparatuses such as video cameras or the like are arranged these days to detect the state of focusing by detecting the sharpness of images from an image signal.
In the conventional automatic focus detecting device of the kind detecting an in-focus position from an amount of focus deviation on the basis of an image signal obtained with images formed on an image sensor, a distance measuring frame is set in the middle part of a photo-taking area and the amount of focus deviation is inferred on the basis of a peak position obtained by computing an autocorrelation function using image data obtained from within the distance measuring frame.
In inferring a maximum correlation position in the above-stated manner using the result of computing the autocorrelation function, a differentiated value of the result of computation of the autocorrelation function is obtained, a position where the polarity of the differentiated value is inverted is detected and this position is decided to be the peak of correlation. In this instance, with a signal outputted from the image sensor assumed to be X(t), the result of computation of correlation to be C(.tau.), the result of differentiation of the computed value of correlation to be Y(.tau.) and the range of data to be used for distance measurement to be T, the result of correlation computation C(.tau.) is expressed by a formula (1) and the result of differentiation Y(.tau.) of the computed value of correlation by a formula (2) as follows: ##EQU1##
Further, the result C(.tau.) of the computation of correlation has a characteristic as shown in FIG. 1 in relation to a variable T while the differentiation result Y(.tau.) of the computed correlation value has a characteristic as shown in FIG. 2. Peaks "b" and "c" are obtained at positions .tau.b and .tau.c as shown in FIG. 1. The polarity of the result Y(.tau.) of differentiation varies respectively at the positions .tau.b and .tau.c as shown in FIG. 2. In the conventional device, the polarity varies to a greater degree before and after the position .tau.b than the position .tau.c. The peak "b" of the position .tau.b is, therefore, decided to be the peak of correlation.
In the conventional automatic focus detecting device described above, the peak of the autocorrelation function appears according to the period of an object of shooting if the object includes a periodic pattern. In such a case, therefore, it becomes hardly possible to discriminate any peak position that results from a focus deviation. Further, since the peak position is decided solely on the basis of the amount of change taking place at the fore-end part of the peak as shown in FIG. 2, if a steep peak exists even at a position where the correlation is not conspicuous, this position might be erroneously decided to be a maximum correlation position.
Another problem with the conventional device lies in the so-called far-and-near competition problem. In other words, in a case where a field obtained within the distance measuring frame includes both a near-distance view and a far-distance view, it becomes impossible to decide on which of them a focusing action should be made, the near-distance view or the far-distance view.